function toNumber(time) {
  let reg = /(\d{2}):(\d{2})\.(\d{2})/;
  let [, m, s, ms] = reg.exec(time);
  return m * 60 * 1000 + s * 1000 + ms * 10;
}
let fs = require("fs");
let path = require("path");
fs.readFile(path.join(__dirname, '粉墨.txt'), 'utf8', (err, data) => {
  if (err) return console.log(err);
  let reg = /\[(\d{2}:\d{2}\.\d{2})\](.*)\r\n/g;
  // let reg=/\[(\d{2}:\d{2}\.\d{2})\](.*)\r\n/g
  let result;
  while (true) {
    result = reg.exec(data);
    if (!result) {
      break;
    }
    let [, time, text] = result;
    setTimeout(() => {
      console.log(text);
    }, toNumber(time));
  }
});
